package com.jy.books.domain;

import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jy.common.annotation.Excel;
import com.jy.common.core.domain.BaseEntity;

/**
 * 图书信息管理对象 books
 * 
 * @author ruoyi
 * @date 2025-05-29
 */
public class Books extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 图书唯一标识，自增主键 */
    private Long bookId;

    /** 图书标题，不能为空 */
    @Excel(name = "图书标题，不能为空")
    private String title;

    /** 图书作者，不能为空 */
    @Excel(name = "图书作者，不能为空")
    private String author;

    /** 图书出版社，不能为空 */
    @Excel(name = "图书出版社，不能为空")
    private String publisher;

    /** 图书出版年份，可为空（如不清楚具体年份） */
    @Excel(name = "图书出版年份，可为空", readConverterExp = "如=不清楚具体年份")
    private Long publicationYear;

    /** 国际标准书号，唯一标识，用于图书识别 */
    @Excel(name = "国际标准书号，唯一标识，用于图书识别")
    private String isbn;

    /** 图书分类，如小说、科幻、历史等 */
    @Excel(name = "图书分类，如小说、科幻、历史等")
    private String category;

    /** 图书馆藏位置，如书架编号、楼层等 */
    @Excel(name = "图书馆藏位置，如书架编号、楼层等")
    private String location;

    /** 图书添加到系统的日期和时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "图书添加到系统的日期和时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addedDate;

    /** 图书借阅管理信息 */
    private List<BorrowRecord> borrowRecordList;

    public void setBookId(Long bookId) 
    {
        this.bookId = bookId;
    }

    public Long getBookId() 
    {
        return bookId;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setAuthor(String author) 
    {
        this.author = author;
    }

    public String getAuthor() 
    {
        return author;
    }

    public void setPublisher(String publisher) 
    {
        this.publisher = publisher;
    }

    public String getPublisher() 
    {
        return publisher;
    }

    public void setPublicationYear(Long publicationYear) 
    {
        this.publicationYear = publicationYear;
    }

    public Long getPublicationYear() 
    {
        return publicationYear;
    }

    public void setIsbn(String isbn) 
    {
        this.isbn = isbn;
    }

    public String getIsbn() 
    {
        return isbn;
    }

    public void setCategory(String category) 
    {
        this.category = category;
    }

    public String getCategory() 
    {
        return category;
    }

    public void setLocation(String location) 
    {
        this.location = location;
    }

    public String getLocation() 
    {
        return location;
    }

    public void setAddedDate(Date addedDate) 
    {
        this.addedDate = addedDate;
    }

    public Date getAddedDate() 
    {
        return addedDate;
    }

    public List<BorrowRecord> getBorrowRecordsList()
    {
        return borrowRecordList;
    }

    public void setBorrowRecordsList(List<BorrowRecord> borrowRecordList)
    {
        this.borrowRecordList = borrowRecordList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("bookId", getBookId())
            .append("title", getTitle())
            .append("author", getAuthor())
            .append("publisher", getPublisher())
            .append("publicationYear", getPublicationYear())
            .append("isbn", getIsbn())
            .append("category", getCategory())
            .append("location", getLocation())
            .append("addedDate", getAddedDate())
            .append("borrowRecordsList", getBorrowRecordsList())
            .toString();
    }
}
